﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PhysioAssist2
{
    public partial class TabletAgendaRegistro : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                cldDia.SelectedDate = DateTime.Now;
            }
        }

        protected void btnSalvar_Click(object sender, EventArgs e)
        {

            if (txtCompromisso.Text == "") return;
            if (txtHora.Text == "") return;

            dsTableAdapters.agendaTableAdapter ta = new dsTableAdapters.agendaTableAdapter();
            ta.Insert(10, cldDia.SelectedDate.Day, cldDia.SelectedDate.Month, cldDia.SelectedDate.Year, txtHora.Text, txtCompromisso.Text);//HARDCODE

            Response.Redirect("TabletAgenda.aspx");

        }
    }
}